<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<link rel="stylesheet" href="./js/layui/css/layui.css">
	</head>
	<body>
		<fieldset id="">
			<legend>信息维护</legend>
			<div class="layui-form">
			<div class="layui-field-box">
				<!-- <form class="layui-form" > -->
					<div class="layui-form-item">
						<label class="layui-form-label">姓名</label>
						<div class="layui-input-inline">
							<input type="text" name="name"  placeholder="请输入姓名"
								autocomplete="off" class="layui-input">
						</div>
						<label class="layui-form-label">地址</label>
						    <div class="layui-input-inline">
						      <select name="addr" lay-verify="required" lay-search lay-filter = 'addr'>
						        <option value="">请选择</option>
						        <option value="北京">北京</option>
						        <option value="上海">上海</option>
						        <option value="广州">广州</option>
						        <option value="深圳">深圳</option>
						        <option value="杭州">杭州</option>
						      </select>
						    </div>
					<input type="button"  id="selc" value="搜索" class="layui-btn"/>
					<input type="button"  value="添加" class="layui-btn" id="add1"/>
					<!-- <button type="button" class="layui-btn">添加</button> -->
					</div>
				<!-- </form> -->
			</div>
			</div>
			<table style="width=60% ;"class=" layui-table">
				<thead>
					<tr>
						<th style="width: 15%; text-align: left;">ID</th>
						<th style="width: 15%; text-align: left;">姓名</th>
						<th style="width: 15%; text-align: left;">生日</th>
						<th style="width: 15%; text-align: left;">性别</th>
						<th style="width: 15%; text-align: left;">爱好</th>
						<th style="width: 15%; text-align: left;">地址</th>
						<th style="width: 15%; text-align: left;">操作</th>
					</tr>
				</thead>
				<tbody id="tbody">
				
				</tbody>
			</table>
		</fieldset>
		<script type="text/html" id="testb">
			<div class="layui-form" lay-filter="testb">
				<div class="layui-form-item">
					<div class="layui-input-inline">
						<input type="hidden" name="id" id="id"   placeholder="请输入姓名"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">姓名</label>
					<div class="layui-input-inline">
						<input type="text" name="name1" id="name1" required lay-verify = "required"  placeholder="请输入姓名"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">生日</label>
					<div class="layui-input-inline">
						<input type="text" name="birth" id="birth" required lay-verify = "required"  placeholder="请输入生日"
							autocomplete="off" class="layui-input">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">性别：</label>
					<div class="layui-input-inline">
					<input type="radio" name="sex" id="sex" value="男" title="男">
					<input type="radio" name="sex" id="sex" value="女" title="女" >
					<!-- <input type="radio" name="sex" value="" title="中性" > -->
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">兴趣</label>
					<div class="layui-inline">
						<input type="checkbox" name="hobby1" value="跑步" title="跑步" >
						<input type="checkbox" name="hobby2" value="篮球" title="篮球" >
						<input type="checkbox" name="hobby3" value="健身" title="健身" >
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">地址</label>
					<div class="layui-input-inline">
						<select name="addr2" id="addr2" lay-verify="" lay-search lay-filter = 'addr2'>
						  <option value="">请选择</option>
						  <option value="北京">北京</option>
						  <option value="上海">上海</option>
						  <option value="广州">广州</option>
						  <option value="深圳">深圳</option>
						  <option value="杭州">杭州</option>
						</select>
					</div>
				</div>
				<div class="layui-input-block">
				<!-- 	<input type="button"   value="确定"  class="layui-btn" />
					<input type="reset"  value="重置" class="layui-btn layui-btn-primary" />
					<input type="button"  class="layui-btn"  value="关闭" /> -->
					<button  lay-submit lay-filter="add" class="layui-btn">确定</button>
					<button  class="layui-btn" onclick="testClose()">取消</button>
				</div>
			</div>
		</script>
		<script type="text/html" id="tradd2">
			<tr id="tr{{d.id}}">
				<td id="tda{{d.id}}">{{d.id}}</td>
				<td id="tdb{{d.id}}">{{d.name1}}</td>
				<td id="tdc{{d.id}}">{{d.birth}}</td>
				<td id="tdd{{d.id}}">{{d.sex}}</td>
				<td id="tde{{d.id}}">{{d.hobby_val}}</td>
				<td id="tdf{{d.id}}">{{d.addr2}}</td>
				<td id="tdg{{d.id}}">
					<a href="javascript:del({{d.id}});" 
					class="layui-btn layui-btn-xs layui-btn-danger">
					<i class="layui-icon layui-icon-delete"></i>
					</a>
					<a href="javascript:upd({{d.id}});" class="layui-btn layui-btn-xs">修改</a>
				</td>
			</tr>
		</script>
		<script src="js/jquery-3.6.0.min.js"></script>
		<script src="js/layui/layui.js"></script>
		<script type="text/javascript" src="js/layui2.js"></script>
	</body>
</html>
